<?php

use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this yii\web\View */

$this->title = Yii::t('common', 'Sltopics').'-'.Yii::$app->params['brand'];
$title = Yii::t('common', 'Sltopics');
$this->params['breadcrumbs'][] = $title;
?>
<div class="note-index row">
    <div class="col-md-8 br10 white">
        <h1><?= Html::encode($title) ?></h1>
        <hr>
<?php foreach ($model as $value): ?>
            <div class="pb">
                <h3 class="list-h3"><small><span><?=$value['type'];?></span>&nbsp;&nbsp;</small></h3>
            </div>
            <?php
            foreach ($value['items'] as $k => $item) {
                if ($k%6 == 0) {
                    echo "<div class='imagetext row'>";
                }
                echo '<div class="imagetext1 col-xs-6 col-sm-4 col-md-2">';
                echo "<p class='img'><a href=" . Url::toRoute('/sltopic/' . $item['id']) . "><img src=" . Yii::$app->params['img_domain'].$item['img'] . " alt=" . $item['title'] . " /></a></p>";
                echo "<h4><a href=" . Url::toRoute('/sltopic/' . $item['id']) . ">" . $item['title'] . "</a></h4>";
                echo '</div>';

                if ($k!=0 & $k%6 == 5) {
                    echo "</div><div class='pb15'></div>";
                }
                if ($k!=5 & $k == (count($value['items']) - 1)) {
                    echo "</div><div class='pb15'></div>";
                }
            }
            ?>
<?php endforeach; ?>
    </div>
    <div class="col-md-4 br10 white">

    </div>

</div>
